﻿using iot.Commons;
using iot.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace iot.Protocol
{
    internal interface IPrototol
    {

        /// <summary>
        /// 读取数据
        /// </summary>
        /// <param name="data"></param>
        object ReadData(PointInfo pointInfo,DataFormatEnum dataFormatEnum = DataFormatEnum.ABCD);
        /// <summary>
        /// 写入数据
        /// </summary>
        /// <returns></returns>
        bool WriteData(PointInfo pointInfo,object data,DataTypeEnum dataTypeEnum);
        /// <summary>
        /// 连接
        /// </summary>
        bool Connect(PlcInfo plcInfo);
        /// <summary>
        /// 断开连接
        /// </summary>
        bool Disconnect();
    }
}
